package cn.itsource.system.service;

import cn.itsource.system.domain.Role;
import cn.itsource.system.query.RoleQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface RoleService {

    /**
     * 新增
     * @param r
     */
    void insert(Role r);

    /**
     * 修改
     * @param r
     */
    void updateByPrimaryKeySelective(Role r);

    /**
     * 分页查询
     * @param roleQuery
     * @return
     */
    PageInfo<Role> pageInfo(RoleQuery roleQuery);

    /**
     * 批量删除
     * @param r
     */
    void deleteAll(List<Role> r);

    /**
     * 删除
     * @param id
     */
    void deleteByPrimaryKey(Long id);


    void savaRoleMenus(Role r);

    void savaPermissions(Role r);

    void deleteRoleMenus(Long rid);

    void deleteRolePermissions(Long pid);
}

